home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1535 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: eql.caltech.edu!rankin
  2. From: rankin@eql.caltech.edu (Pat Rankin)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: 2 C under VMS questions
  5. Date: 14 Jan 1996 15:57 PST
  6. Organization: California Institute of Technology
  7. Distribution: world
  8. Message-ID: <14JAN199615574362@eql.caltech.edu>
  9. References: <4d3eok$hm4@netope.harvard.edu>
  10. NNTP-Posting-Host: bear.eql.caltech.edu
  11. News-Software: VAX/VMS VNEWS 1.40x8  
  12.  
  13. In article <4d3eok$hm4@netope.harvard.edu>,\
  14.  richard@phdcn.harvard.edu (Richard Congdon) writes...
  15. > A couple questions for VMS C gurus"
  16. > 1) Is there any way to do this on VMS?
  17. >        freopen(optarg,"rt",stdin)
  18. >    This call fails.  Do I want something other than stdin?
  19.  
  20.      Use mode "r" instead of "rt", or upgrade from obsolete VAX C to
  21. current DEC C so that you link against a different run-time library
  22. which will ignore excess junk like that trailing "t".
  23.  
  24. > 2) Is there any functional equivalent to Unix ftruncate() or DOS chsize()?
  25.  
  26.      The DEC C V5.2 header files declare ftruncate(), but only if
  27. you're compiling on a VMS V7.0 system.  We're running V6.2, which
  28. doesn't have it, so I don't know whether that function has truely
  29. been added nor whether it has any restrictions or limitations.
  30. Rolling your own is non-trivial, to put it mildly.
  31.  
  32.         Pat Rankin, rankin@eql.caltech.edu
  33.